package javaweb_work01.classesContrl.Service;

import javaweb_work01.classesContrl.Dao.ShowClassesDao;
import javaweb_work01.classesContrl.Entity.Classes;
import javaweb_work01.classesContrl.Factory.ClassesFactory;
import javaweb_work01.main.Utils.PageContrl;

import java.util.List;

public class ShowClassesService {
    //合成复用原则
    private ShowClassesDao showClassesDao;

    public ShowClassesService(){
        this.showClassesDao = ClassesFactory.getShowClassesDao();
    }

    /**
     * 自定义成员方法得到分页显示的班级信息
     * @param page
     * @return
     */
    public List<Classes> showClassesService(PageContrl page){
        return showClassesDao.showClasses(page);
    }
}
